package com.xuan.webfinally.service.impl;

import com.xuan.webfinally.entity.BoWa;
import com.xuan.webfinally.entity.DeviceStatus;
import com.xuan.webfinally.entity.OnTimeData;
import com.xuan.webfinally.entity.Pax;
import com.xuan.webfinally.entity.SlopeMonitorpoints;
import com.xuan.webfinally.entity.SlopeSensorList;
import com.xuan.webfinally.entity.leida;
import com.xuan.webfinally.entity.pax1;
import com.xuan.webfinally.entity.SlopeInfo;
import com.xuan.webfinally.entity.bpjcWarning;
import com.xuan.webfinally.entity.jiancegaikuang;
import com.xuan.webfinally.entity.lxshuju;
import com.xuan.webfinally.entity.pax2;
import com.xuan.webfinally.entity.pax4;
import com.xuan.webfinally.entity.pax5;
import com.xuan.webfinally.entity.pax6;
import com.xuan.webfinally.entity.sbtongji;
import com.xuan.webfinally.entity.vediosAlls;
import com.xuan.webfinally.entity.wurenji;
import com.xuan.webfinally.mapper.RadarMonitoringPngMapper;
import com.xuan.webfinally.mapper.SlopeAiPhotoMapper;
import com.xuan.webfinally.mapper.SlopeCameraAiMapper;
import com.xuan.webfinally.mapper.SlopeCameraMapper;
import com.xuan.webfinally.mapper.SlopeCrackDataMapper;
import com.xuan.webfinally.mapper.SlopeDeviceInfoMapper;
import com.xuan.webfinally.mapper.SlopeDroneCollectionMapper;
import com.xuan.webfinally.mapper.SlopeFencenetDataMapper;
import com.xuan.webfinally.mapper.SlopeGeoacousticDataMapper;
import com.xuan.webfinally.mapper.SlopeInfoMapper;
import com.xuan.webfinally.mapper.SlopeLidarMonitorMapper;
import com.xuan.webfinally.mapper.SlopeRadarMonitorMapper;
import com.xuan.webfinally.mapper.SlopeSensorListMapper;
import com.xuan.webfinally.mapper.SlopeSoilDataMapper;
import com.xuan.webfinally.mapper.SlopeWarningInfoMapper;
import com.xuan.webfinally.mapper.SlopeWeatherDataMapper;
import com.xuan.webfinally.mapper.SysDeptMapper;
import com.xuan.webfinally.mapper.SysUserMapper;
import com.xuan.webfinally.service.ISlopeInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;

/**
 * <p>
 * 边坡信息表 服务实现类
 * </p>
 *
 * @author gyuxuan
 * @since 2025-05-18
 */
@Service
public class SlopeInfoServiceImpl extends ServiceImpl<SlopeInfoMapper, SlopeInfo> implements ISlopeInfoService {


    private final String slopeNameA = "G301国道绥满K208+866~K208+906";
    private final String slopeNameB = "G201国道鹤大K447+406~K447+466";
    private final String slopeNameC = "G201国道鹤大K619+185~K619+255";
    private final String slopeNameD = "G222国道嘉临K354+475~K354+520";
    private final String slopeNameE = "G222国道嘉临K359+150~K359+210";

    @Autowired
    private SlopeCrackDataMapper slopeCrackDataMapper;

    @Autowired
    private SlopeWeatherDataMapper slopeWeatherDataMapper;

    @Autowired
    private SlopeInfoMapper slopeInfoMapper;

    @Autowired
    private SlopeRadarMonitorMapper slopeRadarMonitorMapper;


    @Autowired
    private SlopeDeviceInfoMapper  slopeDeviceInfoMapper;

    @Autowired
    private SysDeptMapper sysDeptMapper;
    @Autowired
    private SysUserMapper sysUserMapper;

    @Autowired
    private SlopeCameraMapper slopeCameraMapper;


    @Autowired
    private SlopeLidarMonitorMapper slopeLidarMonitorMapper;

    @Autowired
    private SlopeWarningInfoMapper slopeWarningInfoMapper;
    @Autowired
    private SlopeSensorListMapper slopeSensorListMapper;
    @Autowired
    private SlopeFencenetDataMapper slopeFencenetDataMapper;
    @Autowired
    private SlopeSoilDataMapper slopeSoilDataMapper;

    @Override
    public List<SlopeInfo> getLatestSlopeInfo(int limit) {
        return slopeInfoMapper.findLatestSlopeInfo(limit);
    }




    @Override
    public jiancegaikuang getMonitoringOverviews(String username,Long deptIds) {
        // 获取用户所属部门ID
        Long deptId ;
        System.out.println("bbbbbbbbbbbbbbbbbbbbbbbbbb:"+username);
        if (username.equals( "admin"))
        {
            System.out.println("aaaaaaaaaaa"+username);
            deptId = deptIds;
            System.out.println("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
        }else {
            deptId = sysUserMapper.selectDeptId(username);
        }



        System.out.println("deptId:..............................////////////////////////////////////"+deptId);
        // 查询边坡名称
        String slopeName = slopeInfoMapper.selectSlopeName(deptId);
        System.out.println("slopeName:"+slopeName);
        // 创建监测概况对象
        jiancegaikuang overview = new jiancegaikuang();
        overview.setSlope_name(slopeName);

        if (slopeName != null) {

            System.out.println("slopeName:"+slopeName);
            // 查询边坡编号
            String slopeCode = slopeInfoMapper.selectSlopeCode(slopeName);
            overview.setSlope_code(slopeCode);
            System.out.println("slopeCode:"+slopeCode);

            // 查询边坡起点与终点
            Double slopeStart = slopeInfoMapper.selectSlopeStart(slopeName);
            Double slopeEnd = slopeInfoMapper.selectSlopeEnd(slopeName);
            overview.setSlope_start_end(slopeStart + "-" + slopeEnd);

            // 查询等级
            String level = slopeInfoMapper.selectLevel(slopeName);
            overview.setLevel(level);

            // 查询观看时间
            String watchingDate = slopeInfoMapper.selectWatchingDate(slopeName);
            overview.setWatchingDate(watchingDate);
        }

        // 设置责任部门名称
        String departmentName = sysDeptMapper.Selectname(deptId);
        overview.setResponsibility_department(departmentName);

        // 设置责任人
        overview.setResponsible_person(username);

        // 设置电话
        String phone = sysUserMapper.selectPhone(username);
        overview.setPhone(phone);

        // 如需启用项目名称，请确保 Mapper 支持并取消以下注释
        // String projectName = slopeInfoMapper.selectProjectName(slopeName);
        // overview.setProject_name(projectName);

        return overview;
    }




//    @Override
//    public jiancegaikuang getMonitoringOverviews(String username) {
//
//          Long  deptId = sysUserMapper.selectDeptId(username);
//
//          // 获取所有数据封装起来
//          jiancegaikuang jiancegaikuang = new jiancegaikuang();
//          // 获取边坡名称
//          jiancegaikuang.setSlope_name(slopeInfoMapper.selectSlopeName(deptId));
//          // 获取边坡编号
//          jiancegaikuang.setSlope_code(slopeInfoMapper.selectSlopeCode(jiancegaikuang.getSlope_name()));
//          // 获取边坡起点和终点
//          double slope_start = slopeInfoMapper.selectSlopeStart(jiancegaikuang.getSlope_name());
//          double  slope_end = slopeInfoMapper.selectSlopeEnd(jiancegaikuang.getSlope_name());
//          // 拼接在一起
//          jiancegaikuang.setSlope_start_end(slope_start+"-"+slope_end);
//
//          // 获取项目名，等级，责任部门，责任人，电话，观看时间
////          jiancegaikuang.setProject_name(slopeInfoMapper.selectProjectName());
//
//          jiancegaikuang.setLevel(slopeInfoMapper.selectLevel(jiancegaikuang.getSlope_name()));
//           //根据用户名得到所属的部门编号，然后得到部门名称
//
//          jiancegaikuang.setResponsibility_department(sysDeptMapper.Selectname(deptId));
//          jiancegaikuang.setResponsible_person(username);
//          String  phone = sysUserMapper.selectPhone(username);
//          System.out.println("phone:"+phone);
//          jiancegaikuang.setPhone(sysUserMapper.selectPhone(username));
//
//          jiancegaikuang.setWatchingDate(slopeInfoMapper.selectWatchingDate(jiancegaikuang.getSlope_name()));
//
//          return  jiancegaikuang;
//    }

    @Override
    public DeviceStatus getDeviceStatus(String username,Long deptId) {

        System.out.println("username:hhhhhhhhhhhhhhhhhhhhhhhhh"+username);
        System.out.println("deptId:hhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjjjjjjj"+deptId);
        DeviceStatus deviceStatus = new DeviceStatus();
        if (deptId == 100L){
            // 裂缝
            deviceStatus.setLiefengnumber(slopeDeviceInfoMapper.selectLiefengnumbers());
            //倾斜
            deviceStatus.setQingxienumber(slopeDeviceInfoMapper.selectQingxienumbers());
            // 震动
            deviceStatus.setZhenDongNumber(slopeDeviceInfoMapper.selectZhenDongNumbers());
            // 诱发原因
            deviceStatus.setYoufayuanyin(slopeWarningInfoMapper.selectYoufayuanyins());
            //  视频检测
            deviceStatus.setShipinjiance(slopeRadarMonitorMapper.selectShipinjiances());
            // 雷达检测
            deviceStatus.setLeidajiance(slopeLidarMonitorMapper.selectLeidajiances());
        }else{
            // 裂缝
            deviceStatus.setLiefengnumber(slopeDeviceInfoMapper.selectLiefengnumber(deptId));
            //倾斜
            deviceStatus.setQingxienumber(slopeDeviceInfoMapper.selectQingxienumber(deptId));
            // 震动
            deviceStatus.setZhenDongNumber(slopeDeviceInfoMapper.selectZhenDongNumber(deptId));
            // 诱发原因
            deviceStatus.setYoufayuanyin(slopeWarningInfoMapper.selectYoufayuanyin(deptId));
            //  视频检测
            deviceStatus.setShipinjiance(slopeRadarMonitorMapper.selectShipinjiance(deptId));
            // 雷达检测
            deviceStatus.setLeidajiance(slopeLidarMonitorMapper.selectLeidajiance(deptId));
        }




        return deviceStatus;

    }

    @Override
    public Map<String, Object> getWarningInfo(String username,Long deptId) {
//        Long deptId

//            deptId = sysUserMapper.selectDeptId(username);
//        Long deptId = sysUserMapper.selectDeptId(username);
//        List<bpjcWarning> bpjcWarningList = new ArrayList<>();
//        bpjcWarning bpjcwarning = new bpjcWarning();
//        bpjcwarning.setBianpomingcheng(slopeInfoMapper.selectSlopeName(deptId));  // 传感编码
//        bpjcwarning.setJiancezhi(0);   // 检测值
//        bpjcwarning.setYujingdengji(slopeWarningInfoMapper.SelectLevel(username));  // 预警等级
//        bpjcwarning.setTime(slopeWarningInfoMapper.selectTime(username));   // 时间
//
//        return bpjcwarning;
        Map<String, Object> result = new HashMap<>();
        List<bpjcWarning> list = new ArrayList<>();
        int total;
        if (deptId == 100L){
            list = slopeWarningInfoMapper.getWarningInfoByPages();
            System.out.println("list:111111111111111111111999999999999999999999"+list);
            total = slopeWarningInfoMapper.countWarningInfos();
        }else {
            list = slopeWarningInfoMapper.getWarningInfoByPage(deptId);
            System.out.println("list:111111111111111111111999999999999999999999"+list);
            total = slopeWarningInfoMapper.countWarningInfo(deptId);
        }
        result.put("data", list);
        result.put("total", total);

        return result;
    }

    @Override
    public String getProvince() {
        return "国道绥满";
    }

    @Override
    public int getCdsl() {
        return 10;
    }

    @Override
    public String getSlopeNames() {
        return "示例边坡";
    }

    @Override
    public List<Map<String, Object>> getSlopeData(Integer page, Integer size, String xzqh, String projectName) {
        // TODO: 实现数据库查询逻辑
        // 这里需要根据实际数据库表结构实现查询
        // 示例返回数据
        List<Map<String, Object>> result = new ArrayList<>();
        Map<String, Object> item = new HashMap<>();
        item.put("xzqy", "示例区域");
        item.put("cdsl", 10);
        item.put("lxcd", 2);
        item.put("yjcd", 1);
        item.put("slopeName", "示例项目");
        result.add(item);
        return result;
    }

    @Override
    public Map<String, Integer> getStatusCount() {
        // TODO: 实现数据库查询逻辑
        Map<String, Integer> result = new HashMap<>();
        result.put("normal", 8);
        result.put("abnormal", 2);
        return result;
    }

    @Override
    public Integer getTotalCount(String xzqh, String projectName) {
        // TODO: 实现数据库查询逻辑
        return 1;
    }

    @Override
    public Double getTemperature() {
        System.out.println("-------------------------------------1111111111111111111111111111111111111111111111111");

        return slopeWeatherDataMapper.getTemperature();
    }

    @Override
    public Double getHumidity() {
        return slopeWeatherDataMapper.getHumidity();
    }

    @Override
    public Double getRainfall() {
        return slopeWeatherDataMapper.getRainfall();
    }

    @Override
    public String getVedio(Long deptId) {
        return slopeCameraMapper.getVedio(deptId);
    }

    @Override
    public int countOnlineDevices() {
        return slopeDeviceInfoMapper.selectLixian();
    }

    @Override
    public int countOfflineDevices() {
        return slopeDeviceInfoMapper.selectZaixian();
    }

    @Override
    public int getTotalCountDevice() {
        return slopeDeviceInfoMapper.selectTotalCountDevice();
    }

    @Override
    public List<OnTimeData> getOnTimeData() {
//        private String slope_name;   // 边坡名称
//        private int point_number;//测点数量
//        private int offline_point_number;// 离线测点数量
//        private int warning_point_number;// 预警测点数量
          List<OnTimeData> list = new ArrayList<>();
          OnTimeData onTimeData1 = new OnTimeData();
          onTimeData1.setSlope_name("G301国道绥满K208+866~K208+906");
          Long deptId1 = 101L;
          onTimeData1.setPoint_number(slopeSensorListMapper.selectPointNumber(deptId1));
          onTimeData1.setOffline_point_number(slopeSensorListMapper.getLiXian(deptId1));
//          onTimeData1.setWarning_point_number(slopeSensorListMapper.getWarning(deptId1));
          onTimeData1.setWarning_point_number(slopeWarningInfoMapper.countWarningInfoa(deptId1));
          onTimeData1.setRemark(slopeInfoMapper.selectRemark(deptId1));


          OnTimeData onTimeData2 = new OnTimeData();
          onTimeData2.setSlope_name("G201国道鹤大K447+406~K447+466");
          Long deptId2 = 102L;
          onTimeData2.setPoint_number(slopeSensorListMapper.selectPointNumber(deptId2));
          onTimeData2.setOffline_point_number(slopeSensorListMapper.getLiXian(deptId2));
          onTimeData2.setWarning_point_number(slopeWarningInfoMapper.countWarningInfoa(deptId2));
          onTimeData2.setRemark(slopeInfoMapper.selectRemark(deptId2));

          OnTimeData onTimeData3 = new OnTimeData();
          onTimeData3.setSlope_name("G201国道鹤大K619+185~K619+255");
          Long deptId3 = 103L;
          onTimeData3.setPoint_number(slopeSensorListMapper.selectPointNumber(deptId3));
          onTimeData3.setOffline_point_number(slopeSensorListMapper.getLiXian(deptId3));
          onTimeData3.setWarning_point_number(slopeWarningInfoMapper.countWarningInfoa(deptId3));
          onTimeData3.setRemark(slopeInfoMapper.selectRemark(deptId3));


          OnTimeData onTimeData4 = new OnTimeData();
          onTimeData4.setSlope_name("G222国道嘉临K354+475~K354+520");
          Long deptId4 = 104L;
          onTimeData4.setPoint_number(slopeSensorListMapper.selectPointNumber(deptId4));
          onTimeData4.setOffline_point_number(slopeSensorListMapper.getLiXian(deptId4));
          onTimeData4.setWarning_point_number(slopeWarningInfoMapper.countWarningInfoa(deptId4));
          onTimeData4.setRemark(slopeInfoMapper.selectRemark(deptId4));



          OnTimeData onTimeData5 = new OnTimeData();
          onTimeData5.setSlope_name("G222国道嘉临K359+150~K359+210");
          Long deptId5 = 104L;
          onTimeData5.setPoint_number(slopeSensorListMapper.selectPointNumber(deptId5));
          onTimeData5.setOffline_point_number(slopeSensorListMapper.getLiXian(deptId5));
          onTimeData5.setWarning_point_number(slopeWarningInfoMapper.countWarningInfoa(deptId5));
          onTimeData5.setRemark(slopeInfoMapper.selectRemark(deptId5));



          list.add(onTimeData1);
          list.add(onTimeData2);
          list.add(onTimeData3);
          list.add(onTimeData4);
          list.add(onTimeData5);
          return list;
    }

    @Override
    public Object getYjxmzssss() {
        return slopeInfoMapper.selectYjxmzssss();
    }

    @Override
    public Object getYjcdzssssssssss() {
        return slopeWarningInfoMapper.countWarningInfos();
    }

    @Override
    public List<lxshuju> getLixianshuju() {
        List<lxshuju> list = slopeWarningInfoMapper.getParts();
        // 先过滤掉列表中的null元素
        list = list.stream().filter(Objects::nonNull).collect(Collectors.toList());
        System.out.println("------------+++++" + list);

        for (int i = 0; i < list.size(); i++) {
            lxshuju item = list.get(i);
            // 再次检查，确保元素不为null
            if (item != null) {
                Long deptId = item.getDeptId();
                // 同时也要考虑deptId可能为null的情况
                if (deptId != null) {
                    item.setSlopeCode(slopeInfoMapper.sselectSlopeCode(deptId));
                    item.setRegion(slopeInfoMapper.selectRemark(deptId));
                } else {
                    // 处理deptId为null的情况，例如设置默认值或记录日志
                    item.setSlopeCode(null);
                    // log.warn("deptId is null for item: {}", item);
                }
            }
        }
        return list;
    }

    @Override
    public int getNormalCount() {
        return slopeWarningInfoMapper.getNormalCount();
    }

    @Override
    public List<sbtongji> getSbtongji() {
        List<sbtongji> list = slopeCrackDataMapper.getSbtongji();
//        for (int i = 0; i < list.size(); i++) {
//            list.get(i).setRegion(slopeInfoMapper.selectRemark(list.get(i).getDeptId()));
//        }
        return list;
    }

    @Override
    public List<vediosAlls> getVideosAll() {
        List<vediosAlls> list = new ArrayList<>();
        List<String> list1 = slopeCameraMapper.getVedios();
        // 一共十个
        for (int i = 0; i < 10; i++) {
            // 先创建对象并添加到集合中
            vediosAlls video = new vediosAlls();
            list.add(video);

            // 现在可以安全地操作集合中的元素了
            video.setVideoUrl(list1.get(i));
            Long deptId = slopeCameraMapper.getVedioDeptId(video.getVideoUrl());

            // 设置slopeName（可以使用switch简化代码）
            if (deptId == 101L) {
                video.setSlopeName(slopeNameA);
            } else if (deptId == 102L) {
                video.setSlopeName(slopeNameB);
            } else if (deptId == 103L) {
                video.setSlopeName(slopeNameC);
            } else if (deptId == 104L) {
                video.setSlopeName(slopeNameD);
            }
            // 可以添加默认情况的处理
            else {
                // video.setSlopeName("默认名称");
            }
        }
        return list;
    }


    @Autowired
    private SlopeDroneCollectionMapper slopeDroneCollectionMapper;

    @Autowired
    private SlopeCameraAiMapper slopeCameraAiMapper;

    @Override
    public List<wurenji> getPlane() {
        return slopeDroneCollectionMapper.getUrl();
    }

    @Override
    public List<String> getAIjcshexiangtou() {
        return slopeCameraAiMapper.selectURL();
    }
//    private SlopeCrackDataMapper slopeCrackDataMapper;
    @Override
    public List<Pax> getPaxs(String monitorId) {
        // 1个deptId 对应多个slope_Code 每个slope_Code 对应多个p
        List<List<Pax>> list = new ArrayList<>();
//        String slope_Code = slopeInfoMapper.sselectSlopeCode(deptId);
        List<Pax> pax = slopeCrackDataMapper.getPaxList(monitorId);




        return pax;
    }

    @Override
    public List<pax1> getPax1(String deptId) {

        // 构造一个map

        List<SlopeMonitorpoints> mpIds = slopeCrackDataMapper.getMonitorPointIds(deptId);
        for(SlopeMonitorpoints id : mpIds){
            List<SlopeSensorList> sensors = slopeCrackDataMapper.getSensorList(id.getMonitorId());
            String type = sensors.get(0).getSensorCode().replaceAll("[^a-zA-Z]", "");
            for(SlopeSensorList sensor : sensors){


            }

        }


        return pax;
    }

    @Override
    public List<List<pax2>> getPax2(Long deptId) {
//        String slope_Code = slopeInfoMapper.sselectSlopeCode(deptId);
//        pax2 list = slopeFencenetDataMapper.getPax2(slope_Code);
//        return list;

        List<List<pax2>> list = new ArrayList<>();
        if (deptId == 104L){
            List<String> slope_Code = slopeInfoMapper.sselectSlopeCodes(deptId);
//            List<Pax> list = new ArrayList<>();

            for (int i = 0; i < list.size(); i++)
            {
                List<pax2> pax = slopeFencenetDataMapper.getPax2(slope_Code.get( i));
                list.add(pax);
            }
            return list;
        }
        String slope_Code = slopeInfoMapper.sselectSlopeCode(deptId);
        List<pax2> pax = slopeFencenetDataMapper.getPax2(slope_Code);
        list.add(pax);
        return list;
    }
    @Autowired
    private SlopeGeoacousticDataMapper slopeGeoacousticDataMapper;
    @Override
    public List<List<pax4>> getPax4(Long deptId) {
//        String slope_Code = slopeInfoMapper.sselectSlopeCode(deptId);
//        return slopeGeoacousticDataMapper.selectMap(slope_Code);
        List<List<pax4>> list = new ArrayList<>();
        if (deptId == 104L){
            List<String> slope_Code = slopeInfoMapper.sselectSlopeCodes(deptId);
//            List<Pax> list = new ArrayList<>();

            for (int i = 0; i < list.size(); i++)
            {
                List<pax4> pax = slopeGeoacousticDataMapper.selectPax4List(slope_Code.get( i));
                list.add(pax);
            }
            return list;
        }
        String slope_Code = slopeInfoMapper.sselectSlopeCode(deptId);
        List<pax4> pax = slopeGeoacousticDataMapper.selectPax4List(slope_Code);
        list.add(pax);
        return list;
    }


    @Override
    public List<List<pax5>> getPax5(Long deptId) {
//        String slope_Code = slopeInfoMapper.sselectSlopeCode(deptId);
//        return slopeSoilDataMapper.selectMap(slope_Code);
        List<List<pax5>> list = new ArrayList<>();
        if (deptId == 104L){
            List<String> slope_Code = slopeInfoMapper.sselectSlopeCodes(deptId);

            for (int i = 0; i < list.size(); i++)
            {
                List<pax5> pax = slopeSoilDataMapper.selectSoilDataList(slope_Code.get( i));
                list.add(pax);
            }
            return list;
        }
        String slope_Code = slopeInfoMapper.sselectSlopeCode(deptId);
        List<pax5> pax = slopeSoilDataMapper.selectSoilDataList(slope_Code);
        list.add(pax);
        return list;
    }

    @Override
    public List<List<pax6>> getPax6(Long deptId) {
//        String slope_Code = slopeInfoMapper.sselectSlopeCode(deptId);
//        return slopeWeatherDataMapper.selectM(slope_Code);

        List<List<pax6>> list = new ArrayList<>();
        if (deptId == 104L){
            List<String> slope_Code = slopeInfoMapper.sselectSlopeCodes(deptId);

            for (int i = 0; i < list.size(); i++)
            {
                List<pax6> pax = slopeWeatherDataMapper.selectWeatherDataList(slope_Code.get( i));
                list.add(pax);
            }
            return list;
        }
        String slope_Code = slopeInfoMapper.sselectSlopeCode(deptId);
        List<pax6> pax = slopeWeatherDataMapper.selectWeatherDataList(slope_Code);
        list.add(pax);
        return list;
    }

    @Autowired
    private RadarMonitoringPngMapper slope1;


    // 雷达监测图片
    @Override
    public List<leida> getLeida() {
        List<leida> list = slope1.getLeida();
        return list;
    }


    @Autowired
    private SlopeAiPhotoMapper slopeAiPhotoMapper;
    @Override
    public List<BoWa> getBowa() {
        return slopeAiPhotoMapper.getBowa();
    }

    @Autowired
//    private SlopeDroneCollectionMapper slopeDroneCollectionMapper;
    @Override
    public List<wurenji> getWuRenJi() {
        return slopeDroneCollectionMapper.getUrl();
    }

    @Override
    public String getSensorCode(String monitorId, String deviceSn) {
       return slopeSensorListMapper.getMonitorCode(monitorId, deviceSn);
    }

}
